@layer components {
  .shiro-link--underline,
  .shiro-timeline a {
    color: currentColor;
    background-image: linear-gradient(
      theme(colors.accent),
      theme(colors.accent)
    );
    background-size: 0% 1.5px;
    background-repeat: no-repeat;
    /* NOTE: this won't work with background images   */
    text-shadow:
      0.05em 0 theme(colors.base-100),
      -0.05em 0 theme(colors.base-100);
    transition: all 500ms ease;

    @apply border-0 no-underline;

    background-position: left 1.2em;

    &:hover {
      background-size: 100% 1.5px;

      transition: all 250ms ease;
    }
  }

  .shiro-timeline {
    position: relative;

    & a {
      line-height: 1.6;
    }

    @apply min-w-0 flex-1 list-inside justify-between;

    & > li::before {
      content: '';
      position: absolute;
      left: -1.05rem;
      bottom: 0;
      border-left: 1px solid theme(colors.accent);
    }

    & > li:first-child:last-child::before {
      border-left: 0;
    }

    & > li:not(:first-child):not(:last-child)::before {
      top: 0;
    }

    & > li:first-child::before {
      top: 50%;
    }

    & > li:last-child::before {
      bottom: 50%;
      top: 0;
    }

    & > li {
      position: relative;
      list-style-type: none;

      line-height: 1.6;
      padding: 3px 0;
      margin: 0 0 0 1rem;
    }

    & > li::after {
      content: '';
      left: -1.28rem;
      top: 50%;
      transform: translateY(-50%);
      height: 0.5rem;
      width: 0.5rem;
      border-radius: 50%;
      position: absolute;
      background-color: theme(colors.accent);
    }
  }
}

@layer components {
  .mask-cover {
    mask-image: linear-gradient(to right, transparent, rgb(0 0 0 / 100%) 90%);
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
  }

  .group:hover .mask-cover {
    opacity: 0.5;
  }

  .animation-blink {
    animation: blink 1.2s linear infinite;
  }

  .mask-top {
    mask-image: linear-gradient(to top, transparent, rgb(0 0 0 / 100%) 90%);
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
  }

  @keyframes blink {
    0% {
      opacity: 0;
    }
    40% {
      opacity: 0;
    }
    40.1% {
      opacity: 1;
    }
    99.9% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  /* 404 */
  .hit-the-floor {
    font-size: 12em;
    font-weight: bold;
    font-family: Helvetica;
    text-shadow:
      0 1px 0 #ccc,
      0 2px 0 #c9c9c9,
      0 3px 0 #bbb,
      0 4px 0 #b9b9b9,
      0 5px 0 #aaa,
      0 6px 1px rgba(0, 0, 0, 0.1),
      0 0 5px rgba(0, 0, 0, 0.1),
      0 1px 3px rgba(0, 0, 0, 0.3),
      0 3px 5px rgba(0, 0, 0, 0.2),
      0 5px 10px rgba(0, 0, 0, 0.25),
      0 10px 10px rgba(0, 0, 0, 0.2),
      0 20px 20px rgba(0, 0, 0, 0.15);
  }
}

.mask-both {
  mask-image: linear-gradient(
    rgba(255, 255, 255, 0) 0%,
    rgb(255, 255, 255) 20px,
    rgb(255, 255, 255) calc(100% - 20px),
    rgba(255, 255, 255, 0) 100%
  );
}

.mask-b {
  mask-image: linear-gradient(
    rgb(255, 255, 255) calc(100% - 20px),
    rgba(255, 255, 255, 0) 100%
  );
}

.mask-t {
  mask-image: linear-gradient(
    rgba(255, 255, 255, 0) 0%,
    rgb(255, 255, 255) 20px
  );
}

.cover-mask-b {
  mask-image: linear-gradient(180deg, #fff -17.19%, #00000000 92.43%);
}
